.TH std::ranges::basic_istream_view::iterator 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::ranges::basic_istream_view::iterator \- std::ranges::basic_istream_view::iterator

.SH Synopsis
   struct /*iterator*/;  \fI(since C++20)\fP
                         (exposition only*)

   The return type of basic_istream_view::begin.

   /*iterator*/ is an input_iterator, but does not satisfy LegacyInputIterator, and
   thus does not work with pre-C++20 algorithms.

.SH Member types

   Member type              Definition
   iterator_concept (C++20) std::input_iterator_tag
   difference_type (C++20)  std::ptrdiff_t
   value_type (C++20)       Val

.SH Member functions

   constructor   constructs an iterator
   (C++20)       \fI(public member function)\fP
   operator=     the copy assignment operator is deleted; /*iterator*/ is move-only
   (C++20)       \fI(public member function)\fP
   operator++    advances the iterator
   (C++20)       \fI(public member function)\fP
   operator*     returns the current element
   (C++20)       \fI(public member function)\fP

std::ranges::basic_istream_view::iterator::iterator

   constexpr explicit /*iterator*/( basic_istream_view& parent ); \fB(1)\fP \fI(since C++20)\fP
   /*iterator*/( const /*iterator*/& ) = delete;                  \fB(2)\fP \fI(since C++20)\fP
   /*iterator*/( /*iterator*/&& ) = default;                      \fB(3)\fP \fI(since C++20)\fP

   1) Constructs an iterator from the parent basic_istream_view.
   2) The copy constructor is deleted. The iterator is not copyable.
   3) The move constructor is defaulted. The iterator is movable.

std::ranges::basic_istream_view::iterator::operator=

   /*iterator*/& operator=( const /*iterator*/& ) = delete; \fB(1)\fP \fI(since C++20)\fP
   /*iterator*/& operator=( /*iterator*/&& ) = default;     \fB(2)\fP \fI(since C++20)\fP

   1) The copy assignment operator is deleted. The iterator is not copyable.
   2) The move assignment operator is defaulted. The iterator is movable.

std::ranges::basic_istream_view::iterator::operator++

   /*iterator*/& operator++(); \fB(1)\fP \fI(since C++20)\fP
   void operator++(int);       \fB(2)\fP \fI(since C++20)\fP

   Reads a value from the underlying stream and stores it into the parent
   basic_istream_view.

.SH Return value

   1) *this
   2) \fI(none)\fP

std::ranges::basic_istream_view::iterator::operator*

   Val& operator*() const;  \fI(since C++20)\fP

   Returns a reference to the stored value.

.SH Non-member functions

   operator== compares with a std::default_sentinel_t
   (C++20)    \fI(public member function)\fP

operator==(std::ranges::basic_istream_view::iterator, std::default_sentinel)

   friend bool operator==( const /*iterator*/& x,                         \fI(since C++20)\fP
   std::default_sentinel_t );

   Compares an iterator with std::default_sentinel_t.

   Returns true if *this does not have a parent basic_istream_view, or if an error has
   occurred on the underlying stream.

   This function is not visible to ordinary unqualified or qualified lookup, and can
   only be found by argument-dependent lookup when
   std::ranges::basic_istream_view::iterator is an associated class of the arguments.

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

     DR    Applied to           Behavior as published               Correct behavior
                      default constructor was provided as C++20  removed along with the
   P2325R3 C++20      iterators                                  requirement
                      must be default_initializable
